#include "stm32f10x_dma.h"  
#include "user_type.h"
#define USART_DR_ADDRESS (USART1_BASE+0x04)
#define USART1TX_DMA_CHANNEL   DMA1_Channel4 
#define USART1RX_DMA_CHANNEL   DMA1_Channel5
#define SRAM2SRAM_DMA_CHANNEL   DMA1_Channel6




#define SRAM2SRAM_BUFFERSIZE  32
#define USART1TX_DMA_BUFFERSIZE 8
#define USART1RX_DMA_BUFFERSIZE 8
#define DMA_DATA_PER_SECOND_USART1_TX    8/*每s发送给数据寄存器的量*/
#define DMA_DATA_PER_SECOND_USART1_RX    8


extern uint32_t * M2M_SendData;
extern uint32_t * M2M_ReceiveData;

extern uint8_t * USART1_TX_DMA_data;
extern uint8_t * USART1_RX_DMA_data;

extern uint32_t periph[SRAM2SRAM_BUFFERSIZE];
extern uint32_t sramdata[SRAM2SRAM_BUFFERSIZE];
extern uint8_t usart12sram_data[USART1RX_DMA_BUFFERSIZE];
extern uint8_t sram2usart1_data[USART1TX_DMA_BUFFERSIZE];


void DMA_Init_sram2usart1(void);
void DMA_Init_sram2sram(void);
void DMA_Init_usart12sram(void);





